﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

namespace HisGL.CA.NetCA
{
  public class ReqNetCA
  {
    /// <summary>
    /// 2.1.2身份预认证
    /// </summary>
    public class UserCertContentDoLogin
    {
      /// <summary>
      /// 0为正常身份认证 1为绑定用户时的身份认证
      /// </summary>
      [JsonProperty(PropertyName = "loginUsage")]
      public int LoginUsage { get; set; }

      /// <summary>
      /// userLoginType	Int	1为口令认证 2为口令+短信认证
      /// </summary>
      [JsonProperty(PropertyName = "userLoginType")]
      public int UserLoginType { get; set; }


      /// <summary>
      /// userPin	String	对用户输入的口令做Base64编码的值，不能为空
      /// </summary>
      [JsonProperty(PropertyName = "userPin")]
      public string UserPin { get; set; }

      /// <summary>
      /// cert	Cert	参考Cert结构, 不能为空，该参数通过证书指定了具体的证书用户，参考用户证书查询的响应，
      /// </summary>
      [JsonProperty(PropertyName = "cert")]
      public Cert Cert { get; set; }


      /// <summary>
      /// applicationId	String	应用id，由云密钥分配，若userLoginType为2，则在2.3 身份预验证之短信验证码校验传applicationId
      /// </summary>
      [JsonProperty(PropertyName = "applicationId")]
      public string ApplicationId { get; set; }
    }


    #region Cert
    public class Cert
    {
      /// <summary>
      /// certContent	String	NOT NULL	Base64编码的证书内容
      /// </summary>
      [JsonProperty(PropertyName = "certContent")]
      public string CertContent { get; set; }
    }
    #endregion Cert

    #region Pdf
    public class SealSize
    {
      /// <summary>
      /// width	Int	签章的宽度
      /// </summary>
      [JsonProperty(PropertyName = "width")]
      public int Width { get; set; }

      /// <summary>
      /// height	Int	签章的高度
      /// </summary>
      [JsonProperty(PropertyName = "height")]
      public int Height { get; set; }

    }

    public class Position
    {
      /// <summary>
      /// page	Int	签章所在的PDF页数，从1开始计数 -1表示最后一页
      /// </summary>
      [JsonProperty(PropertyName = "page")]
      public int Page { get; set; }

      /// <summary>
      /// x	Int	签章的x坐标
      /// </summary>
      [JsonProperty(PropertyName = "x")]
      public int X { get; set; }

      /// <summary>
      /// y	Int	签章的y坐标
      /// </summary>
      [JsonProperty(PropertyName = "y")]
      public int Y { get; set; }

    }


    #endregion Pdf


    #region User
    public class User
    {
      /// <summary>
      /// organizationId	Int	用户所属的机构id，调用机构信息注册获取
      /// </summary>
      [JsonProperty(PropertyName = "organizationId")]
      public int OrganizationId { get; set; }

      /// <summary>
      /// uid	String	用户唯一标识
      /// </summary>
      [JsonProperty(PropertyName = "uid")]
      public string Uid { get; set; }

      /// <summary>
      /// name	String	名称
      /// </summary>
      [JsonProperty(PropertyName = "name")]
      public string Name { get; set; }

      /// <summary>
      /// phone	String	电话
      /// </summary>
      [JsonProperty(PropertyName = "phone")]
      public string Phone { get; set; }

      /// <summary>
      /// email	String	邮箱，可选
      /// </summary>
      [JsonProperty(PropertyName = "email")]
      public string Email { get; set; }


      /// <summary>
      /// countryName	String	国家，只支持CN
      /// </summary>
      [JsonProperty(PropertyName = "countryName")]
      public string CountryName { get; set; }

      /// <summary>
      /// province	String	省份，省份拼音
      /// </summary>
      [JsonProperty(PropertyName = "province")]
      public string Province { get; set; }

      /// <summary>
      /// city	String	城市，城市拼音
      /// </summary>
      [JsonProperty(PropertyName = "city")]
      public string City { get; set; }


      /// <summary>
      /// department	String	部门
      /// </summary>
      [JsonProperty(PropertyName = "department")]
      public string Department { get; set; }

      /// <summary>
      /// officialResidence	String	办公地址，可选
      /// </summary>
      [JsonProperty(PropertyName = "officialResidence")]
      public string OfficialResidence { get; set; }

      /// <summary>
      /// gender	Int	性别，0男1女
      /// </summary>
      [JsonProperty(PropertyName = "gender")]
      public int Gender { get; set; }

      /// <summary>
      /// identityType	Int	证件类型
      /// </summary>
      [JsonProperty(PropertyName = "identityType")]
      public int IdentityType { get; set; }


      /// <summary>
      /// identity	String	证件号码
      /// </summary>
      [JsonProperty(PropertyName = "identity")]
      public string Identity { get; set; }

      /// <summary>
      /// memo	String	备注，可选
      /// </summary>
      [JsonProperty(PropertyName = "memo")]
      public string Memo { get; set; }


    }
    #endregion User


    #region Organization
    public class Organization
    {
    
      /// <summary>
      /// name	String	机构名称
      /// </summary>
      [JsonProperty(PropertyName = "name")]
      public int Name { get; set; }

      /// <summary>
      /// organizationType	Int	机构类型
      /// </summary>
      [JsonProperty(PropertyName = "organizationType")]
      public int OrganizationType { get; set; }

      /// <summary>
      /// identityType	Int	证件类型
      /// </summary>
      [JsonProperty(PropertyName = "identityType")]
      public int IdentityType { get; set; }


      /// <summary>
      /// identity	String	证件号码
      /// </summary>
      [JsonProperty(PropertyName = "identity")]
      public string Identity { get; set; }


      /// <summary>
      /// phone	String	电话
      /// </summary>
      [JsonProperty(PropertyName = "phone")]
      public string Phone { get; set; }

      /// <summary>
      /// email	String	邮箱，可选
      /// </summary>
      [JsonProperty(PropertyName = "email")]
      public string Email { get; set; }

      /// <summary>
      /// officialResidence	String	法定住所
      /// </summary>
      [JsonProperty(PropertyName = "officialResidence")]
      public string OfficialResidence { get; set; }

      /// <summary>
      /// memo	String	备注，可选
      /// </summary>
      [JsonProperty(PropertyName = "memo")]
      public string Memo { get; set; }


      /// <summary>
      /// countryName	String	国家，只支持CN
      /// </summary>
      [JsonProperty(PropertyName = "countryName")]
      public string CountryName { get; set; }

      /// <summary>
      /// province	String	省份，省份拼音
      /// </summary>
      [JsonProperty(PropertyName = "province")]
      public string Province { get; set; }

      /// <summary>
      /// city	String	城市，城市拼音
      /// </summary>
      [JsonProperty(PropertyName = "city")]
      public string City { get; set; }


      /// <summary>
      /// department	String	部门
      /// </summary>
      [JsonProperty(PropertyName = "department")]
      public string Department { get; set; }


      /// <summary>
      /// legalPersonName	String	法人代表名称，可选
      /// </summary>
      [JsonProperty(PropertyName = "legalPersonName")]
      public string LegalPersonName { get; set; }



      /// <summary>
      /// legalPersonPhone	String	法人电话，可选
      /// </summary>
      [JsonProperty(PropertyName = "legalPersonPhone")]
      public string LegalPersonPhone { get; set; }


      /// <summary>
      /// legalPersonIdentityType	String	法人证件类型，可选
      /// </summary>
      [JsonProperty(PropertyName = "legalPersonIdentityType")]
      public string LegalPersonIdentityType { get; set; }

      /// <summary>
      /// legalPersonIdentity	String	法人证件号码，可选   
      /// </summary>
      [JsonProperty(PropertyName = "legalPersonIdentity")]
      public string LegalPersonIdentity { get; set; }


    }
    #endregion Organization
  }
}
